#define _CRT_SECURE_NO_WARNINGS
#include<iostream>
#include<string>
using namespace std;

int main()
{
	string s1;
	string s2;
	string str1 = "0";
	getline(cin, s1);
	getline(cin, s2);
	auto* p1 = s1.c_str();
	auto* p2 = s2.c_str();
	int tmp = 0;
	int sum = 0;
	long long MUL = 0;
	string str;
	auto* start1 = p1 + s1.size() - 1;
	auto* start2 = p2 + s2.size() - 1;
	int wei = 0;
	/*cout << *start1 << "-" << *start2;*/
	for (int j = 0; j < s2.size(); j++)
	{
		for (int k = 0; k < wei; k++)
		{
			str.append(str1);
		}
		for (int i = 0; i < s1.size(); i++)
		{
			
			sum = (*start1 - '0') * (*start2 - '0');
			tmp += sum;
			if (tmp >= 10)
				str.append(to_string(tmp % 10));
			else
			{
				str.append(to_string(tmp));
				tmp = 0;
			}		
			tmp /= 10;
			start1--;
		}
		if (tmp != 0)
			str.append(to_string(tmp));
		sum = 0;
		tmp = 0;
		start1 = p1 + s1.size() - 1;
		start2--;
		
		wei++;
		reverse(str.begin(), str.end());
		MUL += stoi(str);
		str = "";
	}
	cout << MUL << endl;

	return 0;
}